home *** CD-ROM | disk | FTP | other *** search
/ Core Concepts in Art 2 / Core Concepts in Art (Frames of Reference)(The McGraw-Hill Companies)(2004).iso / mac / media / search.swf / scripts / DefineButton2_63 / BUTTONCONDACTION on(release).as next >
Text File  |  2003-10-12  |  1KB  |  46 lines

  1. on(release){
  2.    i = 0;
  3.    while(i < chapterArray[theChapter].length)
  4.    {
  5.       titlesHolder["titles" + i].pointer._visible = 1;
  6.       theTextColor = new Color("titlesHolder.titles" + i + ".title");
  7.       theChapterColor = new Color("titlesHolder.titles" + i + ".chapterHolder.chapNum");
  8.       theTextColor.setRGB(0);
  9.       theChapterColor.setRGB(0);
  10.       if(this["chp" + theChapter] == undefined)
  11.       {
  12.          this["chp" + theChapter] = new Array();
  13.       }
  14.       var count = 0;
  15.       c = 0;
  16.       while(c < listTotal)
  17.       {
  18.          if(listItemsHolder["item" + c].title != titleBuilder_mc.titleArray[i])
  19.          {
  20.             count++;
  21.          }
  22.          c++;
  23.       }
  24.       if(count == listTotal)
  25.       {
  26.          this["chp" + theChapter].push(i);
  27.          duplicateMovieClip(listItemsHolder.item,"item" + listTotal,16384 + (400 + listTotal));
  28.          b = 0;
  29.          while(b < 6)
  30.          {
  31.             listItemsHolder["item" + listTotal][titleBuilder_mc.variables[b]] = titleBuilder_mc[titleBuilder_mc.variables[b] + "Array"][i];
  32.             b++;
  33.          }
  34.          listItemsHolder["item" + listTotal]._y = listTotal * 15 - 1.5;
  35.          listTotal++;
  36.       }
  37.       i++;
  38.    }
  39.    if(listTotal > 10)
  40.    {
  41.       down_btn._visible = 1;
  42.    }
  43.    deselect_btn._visible = 1;
  44.    select_btn._visible = 0;
  45. }
  46.